/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by:   焦质晔
 * @Last Modified time: 2019-06-20 15:45:00
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 新增或更新数据
export const saveActivityInfo = params => axios.post(`${SERVER.MEMBERS_CLUB}/basic/activity/saveActivityInfo`, params);

// 添加或取消活动对应的会员
export const addOrCancelMemberActivity = params => axios.post(`${SERVER.MEMBERS_CLUB}/basic/activity/addOrCancelMemberActivity`, params);

// 获取主页面列表数据
export const searchActivityInfos = params => axios.get(`${SERVER.MEMBERS_CLUB}/basic/activity/searchActivityInfos`, { params });

// 获取会员信息列表
export const searchMemberList = params => axios.get(`${SERVER.MEMBERS_CLUB}/basic/activity/searchMemberList`, { params });

// 获取所有会员卡类别
export const getCardTypes = params => axios.get(`${SERVER.MEMBERS_CLUB}/basic/activity/getCardTypes`, { params });

// 根据activityId获取设计的周周期
export const getWeekDay = params => axios.get(`${SERVER.MEMBERS_CLUB}/basic/activity/getWeekDay`, { params });

// 获取联盟关系
export const getAlliance = params => axios.get(`${SERVER.MEMBERS_CLUB}/membersAlliance/getMembershipAlliance`, { params });

// 下载会员活动
export const downloadActivity = params => axios.get(`${SERVER.MEMBERS_CLUB}/basic/activity/downloadActivity`, { params });
